﻿using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.Storage;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;

namespace Wams.Admin.UI
{
    public static class Utils
    {
        public static CloudStorageAccount StorageAccount
        {
            get
            {
                string cloudConfig = CloudConfigurationManager.GetSetting("Wams.StorageConnectionString");
                if (cloudConfig != null) return CloudStorageAccount.Parse(cloudConfig);
                else return CloudStorageAccount.Parse(ConfigurationManager.AppSettings["Wams.StorageConnectionString"]);
            }
        }
        public static string ContainerName
        {
            get
            {
                string cloudConfig = CloudConfigurationManager.GetSetting("Wams.ContainerName");
                if (cloudConfig != null) return cloudConfig;
                else return ConfigurationManager.AppSettings["Wams.ContainerName"];
            }
        }
         
    }
}